<template>
    <el-button @click="show = !show">Switch</el-button>
    <Transition name="login">
        <p v-if="show">测试xx</p>
    </Transition>
</template>

<script setup>
import {ref} from "vue";

const show = ref(true)
</script>

<style lang="scss" scoped>
.login-enter-active{
    animation: fade-out 2s;
}
.login-leave-active{
    animation: fade-out 2s reverse;
}

@keyframes fade-out {
    0%{
        transform: scale(0);
    }
    50%{
        transform: scale(1.25);
    }
    100%{
        transform: scale(1);
    }
}
</style>